<!DOCTYPE html>
<!-- saved from url=(0064)http://www.shf365.com/mobile/account/user/user_invite_share.aspx -->
<html lang="en" style="font-size: 29.6296px;">
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
  <title>
	邀请
</title>
  <link rel="stylesheet" href="./invitation/commen.css" />
  <link rel="stylesheet" href="./invitation/header.css" />
  <link rel="stylesheet" href="./invitation/footer.css" />
  <link rel="stylesheet" href="./invitation/style_invite.css" />
  <link href="./invitation/fakeLoader.css" rel="stylesheet" />
 <script src="https://cdn.bootcss.com/jquery/3.2.0/jquery.min.js"></script>
 <script src="./invitation/clipboard.min.js"></script>
 <script src="../js/paramsTool.js"></script>
 <script src="../../js/layer.js"></script>
 <script>

     var params = queryString();

     var disOpenid = null,disUid = null;
     if(params.disOpenid){
         disOpenid = params.disOpenid
     }else {
         disOpenid = getCookie('disOpenid');
     }
     if(params.disUid){
         disUid = params.disUid
     }else {
         disUid = getCookie('disUid');
     }


     var imgPath = '../disQR/' + disUid + '.png';
     var shareLink = 'http://weblogin.178dn.net/distribution/view/me.html?regChannel=official'+'&referee='+disOpenid+'&uid='+disUid;
     $(document).ready(function() {

         if(disOpenid && disUid){
             $('#img').attr('src',imgPath);
             $('.link_txt').html(shareLink);
         }else {
             imgPath = '../disQR/10200.png';
             shareLink = 'http://weblogin.178dn.net/distribution/view/me.html';
             $('#img').attr('src',imgPath);
             $('.link_txt').html(shareLink);
         }


         $('#BtnCopy').click(function () {
             var clipboard = new Clipboard('#BtnCopy', {
                 text: function(trigger) {
                     return shareLink;
                 }
             });

             clipboard.on('success', function(e) {
                 layer.open({
                     content: '复制成功'
                     , skin: 'msg'
                     , time: 1.5 //2秒后自动关闭
                 });
             });
             clipboard.on('error', function(e) {
                 layer.open({
                     content: '复制失败，请手动复制粘贴'
                     , skin: 'msg'
                     , time: 1.5 //2秒后自动关闭
                 });
             });
         });
     });
     function createCode() {

         if(disOpenid && disUid){
             $.ajax({
                 url: host + "/createDisQR",
                 type: "get",
                 dataType: 'json',
                 headers: {"content-type": "application/json", "disuid": disUid, 'disopenid': disOpenid},
                 success: function (data) {
                     if(data){
                         alert(data.info);
                     }else {
                         $('#img').attr('src',imgPath);
                     }
                 },
                 error:function() {
                     location.reload();
                 }
             });
         }

     }
 </script>
 </head> 
 <body class="bg_gray"> 
  <div class="fakeloader"></div> 
  <header class="head head_ff5001"> 

   <div class="title">
    立即邀请
   </div> 

  </header>
  <div class="content invite_content"> 
   <div class="in_code"> 
    <div class="title_btn"> 
     <img src="./invitation/btn_2wm.png" /> 
    </div> 
    <div class="codebox">
        <img id="img" onerror='createCode()'>
    </div> 
    <h4>[扫码关注]</h4> 
   </div> 
   <div class="in_link"> 
    <div class="title_btn"> 
     <img src="./invitation/btn_link.png" /> 
    </div> 
    <div class="con"> 
     <div class="link_txt">
      http://weblogin.178dn.net/distribution/view/me.html
     </div> 
     <div class="intro_txt"> 
      <p>1.点击可复制分享链接</p>
      <p>2.将该链接粘贴在任何你想发布的地方（例如：贴吧、论坛,群），用户通过手机访问该链接成功后，即可成为您的徒弟。</p>
     </div> 
    </div> 
    <div class="bt_btn">
        <input type="button" class="btn btn_ff5000" id="BtnCopy" data-clipboard-text="http://weblogin.178dn.net/distribution/view/me.html" value="复制链接">
    </div> 
   </div> 
   <div class="btn_share"> 
    <a href="javascript:;" id="btnShare"> <img src="./invitation/btn_share.png" /></a> 
   </div> 
  </div> 

 </body>
</html>